package cn.sirun.com.fca.personal.center.loader;

import cn.sirun.com.fca.personal.center.model.request.DistributorRequest;
import cn.sirun.com.fca.personal.center.model.request.EditResellerRequest;
import cn.sirun.com.fca.personal.center.model.response.DistributorResponse;
import io.reactivex.Observable;

import com.tencent.cloud.iov.kernel.model.BaseResponse;

import java.util.List;

import cn.sirun.com.fca.personal.center.model.response.CityResponse;
import cn.sirun.com.fca.personal.center.repo.ProfileRepository;
import io.reactivex.schedulers.Schedulers;

public class SettingDistributorLoader extends PersonalCenterFlowLoader {

    public Observable<BaseResponse<List<CityResponse>>> getAllCity() {
        return ProfileRepository.getInstance().getAllCity()
                .subscribeOn(Schedulers.io());
    }

    public Observable<BaseResponse<List<DistributorResponse>>> getCityDistributor(DistributorRequest request) {
        return ProfileRepository.getInstance().getCityDistributor(request)
                .subscribeOn(Schedulers.io());
    }

    public Observable<BaseResponse<Void>> editReseller(EditResellerRequest request){
        return ProfileRepository.getInstance().editReseller(request)
                .subscribeOn(Schedulers.io());
    }
}
